package start.spring.basic.job.controller.jobmonitor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import start.spring.basic.job.common.SysConstant;
import start.spring.basic.job.controller.BaseController;
import start.spring.basic.job.entity.GgThreadExec;
import start.spring.basic.job.service.jobmonitor.IGgThreadExecService;
import start.spring.basic.log.ServiceLog;
import start.spring.basic.page.PageQuery;
import start.spring.basic.response.ResponsePage;

/**
 * 
 * @author xuyy
 * @date 2023-06-29
 *
 */
@RestController
@RequestMapping("/threadlog")
@Api(tags = "线程运行记录相关接口")
public class GgThreadExecController extends BaseController {
	
    @Autowired
    private IGgThreadExecService ggThreadExecService;
	
    @ServiceLog(businessType = "查询线程运行记录列表", systemType = SysConstant.SYSTEM_TYPE, recordResult = false, userId = "")
    @PostMapping("/list")
    @ApiOperation(value = "查询线程运行记录列表", notes = "分页查询")
    public ResponsePage<GgThreadExec> list(PageQuery pageQuery, @RequestBody GgThreadExec ggThreadExec) {
    	return super.returnResponse(this.ggThreadExecService.selectGgThreadExecPageList(pageQuery, ggThreadExec));
    }
}
